﻿Imports System
Imports System.Collections.ObjectModel
Imports System.Workflow.ComponentModel
Imports System.Workflow.ComponentModel.Design

Namespace System.Workflow.Activities
    <ActivityDesignerTheme(GetType(ParallelDesignerTheme))> _
    Friend NotInheritable Class ParallelDesigner
        Inherits ParallelActivityDesigner
        ' Methods
        Public Overrides Function CanInsertActivities(ByVal insertLocation As HitTestInfo, ByVal activitiesToInsert As ReadOnlyCollection([Of] Activity)) As Boolean
            Dim activity As Activity
            For Each activity In activitiesToInsert
                If (Not activity.GetType Is GetType(SequenceActivity)) Then
                    Return False
                End If
            Next
            Return MyBase.CanInsertActivities(insertLocation, activitiesToInsert)
        End Function

        Protected Overrides Function OnCreateNewBranch() As CompositeActivity
            Return New SequenceActivity
        End Function

    End Class
End Namespace

